<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.m</title>
<meta name="generator" content="KF5::SyntaxHighlighting (Matlab)"/>
</head><body style="color:#1f1c1b"><pre>
<span style="color:#898887;">%%=====================================================</span>
<span style="color:#898887;">% MATLAB test code for Kate/Kwrite syntax highlighting</span>
<span style="color:#898887;">%%=====================================================</span>

<span style="color:#898887;">% Numbers _____________________________________________</span>
<span style="color:#b08000;">5</span>, <span style="color:#b08000;">5.5</span>, <span style="color:#b08000;">.1</span>, <span style="color:#b08000;">0.1</span>, <span style="color:#b08000;">0.4e5</span>, <span style="color:#b08000;">1.2e-5</span>, <span style="color:#b08000;">5i</span>, <span style="color:#b08000;">5.3i</span>, <span style="color:#b08000;">6j</span>, <span style="color:#b08000;">.345</span>+<span style="color:#b08000;">3i</span>
<span style="color:#b08000;">5</span>', <span style="color:#b08000;">5.5</span>', <span style="color:#b08000;">.1</span>', <span style="color:#b08000;">0.1</span>', <span style="color:#b08000;">0.4e5</span>', <span style="color:#b08000;">1.2e-5</span>', <span style="color:#b08000;">5i</span>', <span style="color:#b08000;">5.3i</span>', <span style="color:#b08000;">6j</span>', <span style="color:#b08000;">.345</span>+<span style="color:#b08000;">3i</span>'

<span style="color:#898887;">% Operators ___________________________________________</span>
<span style="color:#898887;">% relational operators</span>
<span style="color:#ff5500;">'asdf'</span>~=<span style="color:#b08000;">4</span>, <span style="color:#0057ae;">c</span>&lt;=<span style="color:#b08000;">4</span>, <span style="color:#0057ae;">d</span>&gt;=<span style="color:#b08000;">4</span>, <span style="color:#0057ae;">a</span>&lt;<span style="color:#0057ae;">b</span>, <span style="color:#0057ae;">a</span>&gt;<span style="color:#0057ae;">b</span>, <span style="color:#0057ae;">a</span>==<span style="color:#0057ae;">b</span>, <span style="color:#0057ae;">b</span>||<span style="color:#0057ae;">c</span>, <span style="color:#0057ae;">b</span>&amp;&amp;<span style="color:#0057ae;">c</span>
<span style="color:#898887;">% elementwise arithmetic operators</span>
<span style="color:#0057ae;">a</span>.^<span style="color:#0057ae;">b</span>, <span style="color:#0057ae;">a</span>.*<span style="color:#0057ae;">b</span> <span style="color:#0057ae;">a</span>./<span style="color:#0057ae;">b</span>, <span style="color:#b08000;">1</span>:<span style="color:#b08000;">4</span>:<span style="color:#b08000;">5</span>
<span style="color:#898887;">% single-character binary arithmetic</span>
<span style="color:#0057ae;">a</span>+<span style="color:#b08000;">3</span>, <span style="color:#0057ae;">a</span>-<span style="color:#b08000;">3</span>, <span style="color:#0057ae;">a</span>*<span style="color:#b08000;">2</span>, <span style="color:#0057ae;">a</span>^<span style="color:#b08000;">3</span>, <span style="color:#0057ae;">a</span>/<span style="color:#b08000;">3</span>, <span style="color:#0057ae;">a</span>\<span style="color:#b08000;">3</span>, <span style="color:#0057ae;">a</span>|<span style="color:#0057ae;">b</span>, <span style="color:#0057ae;">a</span>&amp;<span style="color:#0057ae;">b</span>
<span style="color:#898887;">% unary operators</span>
<span style="color:#0057ae;">a</span> = ~<span style="color:#0057ae;">g</span>; <span style="color:#0057ae;">g</span> = @<span style="color:#0057ae;">sfdgdsf</span>(<span style="color:#0057ae;">sdfsd</span>,<span style="color:#b08000;">345</span>); <span style="color:#0057ae;">g</span>.' + <span style="color:#b08000;">1i</span>.' - (<span style="color:#ff5500;">'asdf'</span>).'
<span style="color:#898887;">% separators and delimiter</span>
(<span style="color:#0057ae;">asd</span>),[<span style="color:#0057ae;">sadf</span>];{<span style="color:#0057ae;">asdf</span>},;;,;;;()
<span style="color:#898887;">% continuation</span>
<span style="color:#0057ae;">a</span> = <span style="color:#b08000;">1</span>+ ...
  <span style="color:#b08000;">2</span>;

<span style="color:#898887;">% Character vectors, strings and adjoint ______________</span>
<span style="color:#898887;">% incomplete character vectors</span>
<span style="color:#bf0303;text-decoration:underline;">'string</span>
<span style="color:#bf0303;text-decoration:underline;">'str''</span>
<span style="color:#bf0303;text-decoration:underline;">'str''ing</span>
<span style="color:#898887;">% complete character vectors</span>
<span style="color:#ff5500;">'string'</span> <span style="color:#898887;">% simple string</span>
<span style="color:#ff5500;">''''</span> <span style="color:#898887;">% string containing '</span>
<span style="color:#ff5500;">'str''ing'</span> <span style="color:#898887;">% one string containing '</span>
<span style="color:#ff5500;">'&quot;'</span> <span style="color:#898887;">% string containing &quot;</span>
<span style="color:#ff5500;">'str&quot;ing'</span> <span style="color:#898887;">% one string containing &quot;</span>
<span style="color:#ff5500;">'string'</span> <span style="color:#ff5500;">'string'</span>  <span style="color:#898887;">% two character vectors</span>
<span style="color:#ff5500;">'asdf'</span>  <span style="color:#ff5500;">'asdf'''</span> <span style="color:#0057ae;">variable</span>  <span style="color:#898887;">% two character vectors and a variable</span>
<span style="color:#ff5500;">'asdf''asdf''   fsgdfg'</span> + (<span style="color:#0057ae;">asdf</span>)' - <span style="color:#ff5500;">'asdf'</span>.' + []''''.';<span style="color:#ff5500;">''</span>
<span style="color:#ff5500;">'sadf'</span>.' <span style="color:#898887;">% string transpose</span>
<span style="color:#898887;">% adjoint</span>
{<span style="color:#ff5500;">'asdf'</span>}' + <span style="color:#b08000;">1</span>
(<span style="color:#ff5500;">'asdf'</span>)' + <span style="color:#b08000;">1</span>
[<span style="color:#ff5500;">'asdf'</span>]' + <span style="color:#b08000;">1</span>
<span style="color:#ff5500;">''</span> <span style="color:#0057ae;">var</span>''' <span style="color:#898887;">% empty string, var with &gt;1 adjoints</span>
[<span style="color:#b08000;">5</span>]'*{<span style="color:#b08000;">5</span>}'*(<span style="color:#ff5500;">'asd'</span>)'.'+(<span style="color:#b08000;">5</span>)'*<span style="color:#b08000;">6</span>'*<span style="color:#0057ae;">asdf</span>'*<span style="color:#0057ae;">asdf</span>'.'  <span style="color:#898887;">% many adjoints</span>
<span style="color:#0057ae;">A</span>'*<span style="color:#0057ae;">B</span> + <span style="color:#b08000;">1</span>      <span style="color:#898887;">% adjoint</span>
<span style="color:#0057ae;">A</span>.'*<span style="color:#0057ae;">B</span> + <span style="color:#b08000;">1</span>     <span style="color:#898887;">% transpose</span>
<span style="color:#0057ae;">A</span>.'.'*<span style="color:#0057ae;">B</span> + <span style="color:#b08000;">1</span>   <span style="color:#898887;">% double transpose</span>
<span style="color:#0057ae;">A</span>'.' + <span style="color:#b08000;">1</span>      <span style="color:#898887;">% adjoint, then transpose</span>
<span style="color:#0057ae;">A</span>.''          <span style="color:#898887;">% transpose, then adjoint</span>
<span style="color:#898887;">% incomplete strings</span>
<span style="color:#bf0303;text-decoration:underline;">&quot;string</span>
<span style="color:#bf0303;text-decoration:underline;">&quot;str&quot;&quot;</span>
<span style="color:#bf0303;text-decoration:underline;">&quot;str&quot;&quot;ing</span>
<span style="color:#898887;">% complete strings</span>
<span style="color:#bf0303;">&quot;string&quot;</span> <span style="color:#898887;">% simple string</span>
<span style="color:#bf0303;">&quot;'&quot;</span> <span style="color:#898887;">% string containing '</span>
<span style="color:#bf0303;">&quot;str'ing&quot;</span> <span style="color:#898887;">% one string containing '</span>
<span style="color:#bf0303;">&quot;&quot;&quot;&quot;</span> <span style="color:#898887;">% string containing &quot;</span>
<span style="color:#bf0303;">&quot;str&quot;&quot;ing&quot;</span> <span style="color:#898887;">% one string containing &quot;</span>
<span style="color:#bf0303;">&quot;string&quot;</span> <span style="color:#bf0303;">&quot;string&quot;</span>  <span style="color:#898887;">% two strings</span>
<span style="color:#bf0303;">&quot;asdf&quot;</span>  <span style="color:#bf0303;">&quot;asdf&quot;&quot;&quot;</span> <span style="color:#0057ae;">variable</span>  <span style="color:#898887;">% two strings and a variable</span>

<span style="color:#898887;">% System command ______________________________________</span>
<span style="color:#b08000;">!hostname</span>
<span style="color:#b08000;">!cp * /tmp</span>

<span style="color:#898887;">% Reserved keywords ___________________________________</span>
<span style="font-weight:bold;">function</span>, <span style="font-weight:bold;">persistent</span>, <span style="font-weight:bold;">global</span>
<span style="font-weight:bold;">switch</span>, <span style="font-weight:bold;">case</span>, <span style="font-weight:bold;">otherwise</span>
<span style="font-weight:bold;">if</span>, <span style="font-weight:bold;">else</span>, <span style="font-weight:bold;">elseif</span>
<span style="font-weight:bold;">try</span>, <span style="font-weight:bold;">catch</span>
<span style="font-weight:bold;">for</span>, <span style="font-weight:bold;">while</span>, <span style="font-weight:bold;">break</span>, <span style="font-weight:bold;">continue</span>
<span style="font-weight:bold;">end</span>, <span style="font-weight:bold;">return</span>
<span style="font-weight:bold;">function</span>, <span style="color:#0057ae;">FUNCTION</span>, <span style="color:#0057ae;">Function</span>  <span style="color:#898887;">% case sensitive!</span>
</pre></body></html>
